using System;
using System.Configuration;
using System.Text;
using System.Windows;
using System.Net;
using System.Net.Sockets;
using System.Windows.Controls;
using System.Threading;
using System.Windows.Threading;

namespace ServerApplication
{
    namespace PeerManager
    {
        namespace Peer
        {
            ///-------------------------------------------------------------------------------------------------
            /// <summary>   A peer representation for the PeerManager. </summary>
            ///
            /// <remarks>   Adrian, 08/11/2015. </remarks>
            ///-------------------------------------------------------------------------------------------------

            class Peer
            {
                private IPAddress m_ipAddress;
                private int m_portNumber;

                public int PortNumber 
                {
                    get
                    {
                        return m_portNumber;
                    }
                    
                    set
                    {
                        m_portNumber = value;
                    }
                }

                public IPAddress IpAddress
                {
                    get 
                    {
                        return m_ipAddress;
                    }
                    
                    set 
                    {
                        m_ipAddress = value;
                    }
                }

                public Peer(IPAddress p_ipAddress, int p_portNumber)
                {
                    this.IpAddress = p_ipAddress;
                    this.PortNumber = p_portNumber;
                }

                public string ToString()
                {
                    return IpAddress.ToString() + ":" + PortNumber.ToString();
                }

            }
        }
    }

}
